package design.Mediator;

/**
 * Created by looper on 2017/8/28.
 */
public class MediatorTest {
  public static void main(String[] args) {
    ConcreteMediator mediator = new ConcreteMediator();

    ProductDepartment productDepartment = new ProductDepartment("产品部",mediator);
    ResearchDepartment researchDepartment = new ResearchDepartment("研发部",mediator);

    mediator.setProductDepartment(productDepartment);
    mediator.setResearchDepartment(researchDepartment);

    productDepartment.sendMessage(productDepartment,"我是产品部,需要研发部提供具体的开发日程");
    researchDepartment.sendMessage(researchDepartment,"我的研发部,最新的开发日程已经发送到你们,请注意查收");
  }
}
